package com.itheima.多线程.基础;

public class Demo9 {
    public static void main(String[] args) {
        Thread t1 = new Thread(() -> {
            for (int i = 0; i < 100; i++) {
                System.out.println("中奖。。。。。。。。。。。。。");
                System.out.println(Thread.currentThread().getName() + "...." + i);
            } });
        t1.start();
        Thread t2 = new Thread(() -> {
            for (int i = 0; i < 100; i++) {
                System.out.println("不中奖。。。。。。。。。。。。。");
                System.out.println(Thread.currentThread().getName() + "...." + i);
            } });
        t1.setPriority(1);
        t2.setPriority(10);
        t2.start();
    }
}
